package com.order.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import com.order.dao.PersonDao;
import com.order.entity.Person;

/**
 * 人员持久层Dao接口实现类
 * @author xdc
 * @date 2014-11-6 下午03:58:49
 */
@Repository
public class PersonDaoImpl implements PersonDao {

	@Autowired
	private JdbcTemplate jdbcTemplate;
	
	/* (non-Javadoc)
	 * @see com.spring.demo.dao.PersonDao#getPersonList()
	 */
	@Override
	public List<Person> getPersonList() {

		return jdbcTemplate.query("select * from person", new Person.PersonRowMapper());
	}

}
